$objWMIServ=GetObject("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL",48)
For Each $obj In $objWMIServ
$BootupState=$obj.BootupState
Next
$BootStat=$BootupState
$BootupState=left(ucase($BootupState),6)
if ($BootupState="NORMAL")=0 $SafeMode="Y" endif
Else
$BootStat="Undetermined"
$SafeMode="U"
EndIf
If ($SafeMode="Y")=1 and exist ("avp.set")=1 goto SCAN endif
If ($SafeMode="Y")=1 and exist ("avp.set")=0
if @inwin=1
BEEP
ShutDown ("","Kaspersky signature files were not found. The computer is being shutdown so you can download the needed Kaspersky files in Normal Mode",30,1,1)
goto END
else
BEEP
messagebox("Kaspersky signature files were not found. The computer is being shutdown so you can download the needed Sophos files in Normal Mode"," Sophos Command Line Scanner ",48,15)
run "%windir%\RUNDLL32.EXE user.exe,ExitWindows"
goto END
endif
endif
gosub "GetFiles"
:SCAN
$result=messagebox ("Do you want to run the Kaspersky CLS now ? "," Kaspersky Command Line Scanner ",36,20)
SELECT
CASE ($result="6")=1
; YES
$result=messagebox ("Do you want to scan a particular folder or location ? "," Kaspersky Command Line Scanner ",36,20)